.container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background-color: #fff;
}

.loader {
  --size: 32px;
  --duration: 800ms;
  width: 96px;
  height: 64px;
  margin: 50px auto;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  transform: rotateX(60deg) rotateZ(45deg) rotateY(0deg) translateZ(0px);
  position: relative;
}

.loader .box {
  width: 32px;
  height: 32px;
  transform-style: preserve-3d;
  position: absolute;
  top: 0;
  left: 0;
}

.loader .box:nth-child(1) {
  transform: translate(100%, 0);
  animation: box1 800ms linear infinite;
}

.loader .box:nth-child(2) {
  transform: translate(0, 100%);
  animation: box2 800ms linear infinite;
}

.loader .box:nth-child(3) {
  transform: translate(100%, 100%);
  animation: box3 800ms linear infinite;
}

.loader .box:nth-child(4) {
  transform: translate(200%, 0);
  animation: box4 800ms linear infinite;
}

.loader .box > div {
  --translateZ: calc(var(--size) / 2);
  --rotateY: 0deg;
  --rotateX: 0deg;
  background: #5c8df6;
  width: 100%;
  height: 100%;
  transform: rotateY(var(--rotateY)) rotateX(var(--rotateX))
    translateZ(var(--translateZ));
  position: absolute;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
}

.loader .box > div:nth-child(1) {
  top: 0;
  left: 0;
}

.loader .box > div:nth-child(2) {
  background: #145af2;
  right: 0;
  --rotateY: 90deg;
}

.loader .box > div:nth-child(3) {
  background: #447cf5;
  --rotateX: -90deg;
}

.loader .box > div:nth-child(4) {
  background: #dbe3f4;
  top: 0;
  left: 0;
  --translateZ: calc(var(--size) * 3 * -1);
}

@keyframes box1 {
  0%,
  50% {
    transform: translate(100%, 0);
  }

  100% {
    transform: translate(200%, 0);
  }
}

@keyframes box2 {
  0% {
    transform: translate(0, 100%);
  }

  50% {
    transform: translate(0, 0);
  }

  100% {
    transform: translate(100%, 0);
  }
}

@keyframes box3 {
  0%,
  50% {
    transform: translate(100%, 100%);
  }

  100% {
    transform: translate(0, 100%);
  }
}

@keyframes box4 {
  0% {
    transform: translate(200%, 0);
  }

  50% {
    transform: translate(200%, 100%);
  }

  100% {
    transform: translate(100%, 100%);
  }
}

.load {
  display: flex;
  font-size: 30px;
  color: #666;
}

.bounce {
  margin-left: 10px;
  width: 4px;
  height: 4px;
  background-color: #666;
  border-radius: 100%;
  display: inline-block;
  -webkit-animation: bouncedelay 1.4s infinite ease-in-out;
  animation: bouncedelay 1.4s infinite ease-in-out;
  /* Prevent first frame from flickering when animation starts */
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}

.spinner .bounce1 {
  -webkit-animation-delay: -0.32s;
  animation-delay: -0.32s;
}

.spinner .bounce2 {
  -webkit-animation-delay: -0.16s;
  animation-delay: -0.16s;
}

@-webkit-keyframes bouncedelay {
  0%,
  80%,
  100% {
    -webkit-transform: scale(0);
  }

  40% {
    -webkit-transform: scale(1);
  }
}

@keyframes bouncedelay {
  0%,
  80%,
  100% {
    transform: scale(0);
    -webkit-transform: scale(0);
  }

  40% {
    transform: scale(1);
    -webkit-transform: scale(1);
  }
}

.loading {
  text-shadow: 1px 1px 0 #cce7f8, -1px -1px 0 #cce7f8;
}
